/*
 * @Author: xueyp
 * @Date: 2020-06-10 16:23:14
 * @Last Modified by: xueyp
 * @Last Modified time: 2020-06-10 21:21:45
 */
<template>
  <div class="weather">
    <img v-if="weatherType === 'sun'" src="../../assets/images/sun.png" alt="">
    <img v-if="weatherType === 'moon'" src="../../assets/images/moon.png" alt="">
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  data() {
    return {
      
    };
  },
  props: {
    weatherType: {
      type: String,
      required: true,
      default: 'sun'
    }
  },
  computed: {
    ...mapState({
      timeState: "timeState"
    })
  }
};
</script>

<style scoped lang="less">
.weather {
  position: absolute;
  top: 0.7rem;
  right: 0rem;
  img {
    width: 3rem;
  }
}
</style>
